package cluster

import "context"

type Allocator interface {
	// SetMulti 设置玩家服务器分配信息
	SetMulti(ctx context.Context, uid string, servers map[string]string) error

	// SetUsersServer 设置多个玩家某一类服务器分配细信息
	SetUsersServer(ctx context.Context, uids []string, serverType string, serverId string) error

	// GetAll 获取玩家的所有服务器配置
	GetAll(ctx context.Context, uid string) map[string]string

	// GetServer 获得一个人的一个服务器信息
	GetServer(ctx context.Context, uid string, serverType string) string

	// GetMulti 获取玩家的多个服务器信息
	GetMulti(ctx context.Context, uid string, serverTypes []string) map[string]string

	// GetUsersServer 获得多个玩家某类服务器信息
	GetUsersServer(ctx context.Context, uids []string, serverType string) map[string]string

	// UnAllocate 清除玩家服务器信息
	UnAllocate(ctx context.Context, uid string) error

	// UnsetUsersServer 清除多个玩家一类服务器信息
	UnsetUsersServer(ctx context.Context, uids []string, serverType string) error
}
